package cn.wolfcode.shop.server.mapper;

import cn.wolfcode.shop.api.domain.Product;
import cn.wolfcode.shop.api.query.ProductListQueryObject;
import cn.wolfcode.shop.api.query.ProductQueryObject;

import java.util.List;

public interface ProductMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Product record);

    Product selectByPrimaryKey(Long id);

    List<Product> selectAll();

    List<Product> listProducts();//brand 类需要

    int updateByPrimaryKey(Product record);

    int queryForCount(ProductQueryObject qo);

    List<Product> queryForList(ProductQueryObject qo);

    Product selectProductInfoVoByPrimaryKey(Long id);

    int queryForCountInterface(ProductListQueryObject qo);

    List<Product> queryForListInterface(ProductListQueryObject qo);
}